package com.czxy.user.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.czxy.domain.TbUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author xuewen
 * @since 2022-02-06
 */
@Mapper
public interface UserMapper extends BaseMapper<TbUser> {
    @Select("SELECT count(*) FROM tb_user WHERE PERIOD_DIFF( date_format( now( ) , '%Y%m' ) , date_format( create_time, '%Y%m' ) ) =#{num}")
    public Integer findCountByDate(@Param("num") Integer num);
}
